Skip to content

Conversation

@ytdHuang
Copy link
Member

@ytdHuang ytdHuang commented Jun 5, 2025

Checklist

Thank you for contributing to QuantumToolbox.jl! Please make sure you have finished the following tasks before opening the PR.

  • Please read Contributing to Quantum Toolbox in Julia.
  • Any code changes were done in a way that does not break public API.
  • Appropriate tests were added and tested locally by running: make test.
  • Any code changes should be julia formatted by running: make format.
  • All documents (in docs/ folder) related to code changes were updated and able to build locally by running: make docs.
  • (If necessary) the CHANGELOG.md should be updated (regarding to the code changes) and built by running: make changelog.

Request for a review after you have completed all the tasks. If you have not finished them all, you can also open a Draft Pull Request to let the others know this on-going work.

Description

There are still many things to improve in the previous PR #472.

  • Add LaTeXStrings to main package dependencies, so that we can set the LaTeX labels (LaTeXStrings doesn't have other dependencies, so I think it is fine)
  • Move many functions in Makie extension to the main package src/visualization.jl (since those functions doesn't relate to Makie)
  • Add Base.show for Bloch and also improve the Base.show for Settings together.
  • improve exception handling and tests for exceptions
  • improve documentation page
  • improve docstrings

@codecov
Copy link

codecov bot commented Jun 5, 2025

Codecov Report

Attention: Patch coverage is 85.10638% with 14 lines in your changes missing coverage. Please review.

Project coverage is 93.95%. Comparing base (47deb2c) to head (1c773fd).

Files with missing lines Patch % Lines
src/visualization.jl 81.42% 13 Missing ⚠️
src/settings.jl 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #480      +/-   ##
==========================================
+ Coverage   93.67%   93.95%   +0.27%     
==========================================
  Files          50       50              
  Lines        3414     3423       +9     
==========================================
+ Hits         3198     3216      +18     
+ Misses        216      207       -9     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ytdHuang ytdHuang marked this pull request as draft June 5, 2025 05:52
@ytdHuang
Copy link
Member Author

ytdHuang commented Jun 5, 2025

@Fe-r-oz

The Bloch sphere render in documentation doesn't seem correct even after your PR (the dev docs here https://qutip.org/QuantumToolbox.jl/dev/users_guide/plotting_the_bloch_sphere)

Do you have any idea ?

@ytdHuang ytdHuang marked this pull request as ready for review June 5, 2025 08:05
@Fe-r-oz
Copy link
Contributor

Fe-r-oz commented Jun 5, 2025

Sorry about that, I submitted to fix as subcmmit here, I didn't used location parameter, I guess Edit: I think that in other places where plotting is done, we pass location which might be helpful as it was not done earlier.

julia> fig = Figure(size = (700, 700), figure_padding = 0)

julia> b = Bloch();

julia> fig, ax = render(b,location = fig[1,1])
(Scene (700px, 700px):
  0 Plots
  1 Child Scene:
    └ Scene (700px, 700px), Axis3())
fig

display

@ytdHuang ytdHuang requested a review from albertomercurio June 5, 2025 14:55
@ytdHuang ytdHuang merged commit 64ec15d into main Jun 5, 2025
@ytdHuang ytdHuang deleted the fix/bloch branch June 5, 2025 17:26
@Fe-r-oz
Copy link
Contributor

Fe-r-oz commented Jun 5, 2025

Thank you very much for the improvements!! I’m very happy to see the Bloch sphere in the documentation!! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants